package com.flejay.dreamrecruiter.model;

import java.util.List;
import java.util.UUID;

import org.apache.commons.lang3.builder.ReflectionToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

/**
 * Représente le CV en cours d'analyse
 * 
 * @author Victor Fleurant
 *
 */
public final class CurriculumVitae {

	private CurriculumVitae(){
		super();
	}
	
	// identifiant du CV
	private String id;
	
	// nom du CV
	private String name;
	
	// contenu du CV original
	private String content;
	
	// liste des blocs extraits du CV
	private List<Block> blockList;

	public static CurriculumVitae getNewInstance(){
		CurriculumVitae cv = new CurriculumVitae();
		cv.id = UUID.randomUUID().toString();
		cv.name = "";
		cv.content = "";
		return cv;
	}
	
	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getContent() {
		return content;
	}

	public void setContent(String content) {
		this.content = content;
	}

	public List<Block> getBlockList() {
		return blockList;
	}

	public void setBlockList(List<Block> blockList) {
		this.blockList = blockList;
	}
	
	@Override
	public String toString(){
		return ReflectionToStringBuilder.toString(this, ToStringStyle.SHORT_PREFIX_STYLE);
	}
}
